/**
 * Project  : Looker
 * Package  : net.freestu.looker.monitor
 * File     : Parser.java
 * Author   : solosky < solosky772@qq.com >
 * Date     : Aug 23, 2009
 * Modified : Aug 23, 2009
 * License  : Apache License 2.0 
 */
package net.freestu.looker.monitor;

import net.freestu.looker.common.Category;

import org.apache.commons.configuration.Configuration;
import org.apache.log4j.Logger;

/**
 *  
 */
public abstract class AbstractParser
{

	/**
     * 正文
     */
    protected String html;
    
    /**
     * 站点配置
     */
    protected Configuration siteConfiguration;
    
	/**
	 * 栏目对象
	 */
	protected Category category;
    
    /**
     * 日志记录
     */
    protected Logger logger = Logger.getLogger(AbstractParser.class);

	/**
	 * 
	 */
	public AbstractParser(String html,Category category)
	{
		this.html =  html;
		this.category = category;
		this.siteConfiguration = category.getSite().getConfig();
	}

	/**
     * 开始分析
     */
    public abstract void parse();
    
    /**
     * 返回分析结果
     */
    public abstract Object getParsed();

}
